package io;

import java.io.File;
import java.io.IOException;

public class IoDemo1 {

    public static void main(String[] args)  throws IOException{
        File file = new File("./picture/javaEE.jpg");
        System.out.println(file.getName()); //获取到文件名
        System.out.println(file.getParent()); //获取到父级路径
        System.out.println(file.getPath()); //获取到完整路径
        System.out.println(file.getAbsolutePath()); //获取到绝对路径
        System.out.println(file.getCanonicalPath()); //获取到绝对路径的简化路径
    }
}
